/* ***********************
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is briefShowUntil.js module.
 *
 * The Initial Developer of the Original Code is Rob Gerns.
 *
 * Portions created by the Initial Developer are Copyright (C) 2011
 * the Initial Developer. All Rights Reserved.
 *
 **************************/
function getBriefShowUntil(objXmlDocument) {
    /*************************************************
    * Function Name(s): getBriefShowUntil()
    *
    * Purpose: Check to see if the Oister file has a showuntil 
    * datetime defined. If so, call the "checkShowUntil" function
    * to check to see if the showuntil datetime has happened. 
    * If so, don't display any part of the Oister feed to the user.
    ***************************************************/  
    var objBrief = objXmlDocument.getElementsByTagName("brief")[0];
    var objShowUntil = objBrief.getElementsByTagName("showuntil")[0];
    var strShowUntil = "";
    var blnHideShowUntil = false;
    
    if (objShowUntil !== undefined) {
        strShowUntil = objShowUntil.nodeValue;
        //refer to checkShowUntil.js for checkShowUntil function.
        blnHideShowUntil = checkShowUntil(strShowUntil);
    }
    if (blnHideShowUntil === true) {
        document.getElementById("container").style.display = "none";
    }
}